const readline = require("readline");

function getProcessInput(question) {
  return new Promise((resolve, reject) => {
    // 创建接口实例
    let r1 = readline.createInterface({
      input: process.stdin,
      output: process.stdout,
    });

    r1.question(question, (answer) => {
      resolve(answer.trim());
      r1.close();
    });
  });
}

module.exports = {
  getProcessInput,
}